{% extends "base.html" %}

{% block conetnt %}
    <section class="content-header">
        <h1>教师端管理系统</h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 章节管理</a></li>
            <li class="active">添加章节</li>
        </ol>
    </section>
    <section class="content" id="showcontent">
        <div class="row">
            <div class="col-md-12">
                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">添加班级</h3>

                    </div>
                    {% if messages %}
                        {% for message in messages %}
                            <div class="alert alert-success"> {{ message }}</div>
                        {% endfor %}
                    {% endif %}
                    {% if form.errors %}
                        {% for key,error in form.errors.items %}
                            <div class="alert alert-warning"> {{ error }}</div>
                        {% endfor %}
                    {% endif %}
                    <form role="form" action="" method="post">
                        <div class="box-body">
                            <div class="form-group">
                                <label for="input_name">{{ form.name.label }}</label>
                                {{ form.name }}
                            </div>
                            <div class="form-group">
                                <label for="input_name">{{ form.course.label }}</label>
                                {{ form.course }}
                            </div>
                        </div>
                        {% csrf_token %}
                        <div class="box-footer">
                            <button type="submit" class="btn btn-primary">添加</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </section>
{% endblock %}